package com.example.administrator.nl.util;

import java.util.Random;

/**
 * Created by yuanmengkai on 2019/9/1.
 */

public class RandomUtil {

    public static int randomInt(int max, int min) {
        Random rand = new Random();
//        return rand.nextInt(max) + min;
        return (int) (10 + Math.random() * (max - min + 1));

    }


    public static double randomDouble( double min, double max) {
        return (float) (min + ((max - min) * new Random().nextDouble()));
    }
}
